import {instance} from '@/utils/request'
import {products,goodsid,Get_GoodsByTypeList,GetTagGoodsList,getSpecialGoodsInfoList_req} from '@/types/reqtypes'
//获取商品列表
export function GetDSGoodsList(params: products){
    return instance.post("/GetDSGoodsList",
        params
    ).then(data => [true, data])
    .catch(err => [false,err])
}
//获取商品详情
export function Details(params: goodsid){
    return instance.post("/getGoodsInfoList",
        params
    ).then(data => [true, data])
    .catch(err => [false,err])
}
//获取促销商品
export function GoodsType(params: Get_GoodsByTypeList){
    return instance.post("/Get_GoodsByTypeList",
        params
    ).then(data => [true, data])
    .catch(err => [false,err])
}
export function GetProductClass(){
    return instance.post("/GetProductClass").then(data => [true, data])
    .catch(err => [false,err])
}
//获取标签商品列表
export function GetTagGoodsList(params: GetTagGoodsList){
    return instance.post("/GetTagGoodsList",
        params
    ).then(data => [true, data])
    .catch(err => [false,err])
}
//获取标签商品列表，此接口不过滤上架和库存
export function GetH11GoodsList(params: GetTagGoodsList){
    return instance.post("/GetH11GoodsList",
        params
    ).then(data => [true, data])
    .catch(err => [false,err])
}

//获取国家馆信息列表
export function getsdb_b2c_country(){
    return instance.post("/getsdb_b2c_country"
    ).then(data => [true, data])
    .catch(err => [false,err])
}
//获取分享促销商品列表
export function getstarbuy_special(){
    return instance.post("/getstarbuy_special"
    ).then(data => [true, data])
    .catch(err => [false,err])
}
//获取分享促销商品详情
export function getSpecialGoodsInfoList(params: getSpecialGoodsInfoList_req){
    return instance.post("/getSpecialGoodsInfoList",params
    ).then(data => [true, data])
    .catch(err => [false,err])
}
